package org.vordel.incubator.examples.management_api;

import java.io.File;
import java.io.FileInputStream;

import java.io.File;
import java.util.Collection;
import java.util.Properties;

import com.vordel.es.ESPK;
import com.vordel.es.Entity;
import com.vordel.es.EntityStoreException;
import com.vordel.es.EntityStoreFactory;
import com.vordel.es.EntityType;
import com.vordel.es.Field;
import com.vordel.es.FieldType;
import com.vordel.es.Value;
import com.vordel.es.fed.FederatedEntityStore;
import com.vordel.es.fed.assembly.Assembly;
import com.vordel.es.fed.assembly.Store;
import com.vordel.es.fed.assembly.StoreManager;
import com.vordel.pd.agent.ManagementAgentUtil;
import com.vordel.pd.api.DeploymentResult;
import com.vordel.pd.api.PolicyDirector;
import com.vordel.pd.client.PDClientUtil;
import com.vordel.pd.generated.PolicyDirectorServiceLocator;
import com.vordel.pd.generated.agent.management.ManagementAgent;
import com.vordel.pd.impl.PolicyDirectorManager;

public abstract class Session {

	protected File workingDriectory;
	protected FederatedEntityStore entityStore;
	
	protected Session() {};
	
	protected void initSession() throws Exception {
		
		//this.entityStore.startTransaction();
		
	}
	
	public void commit() throws Exception {
		//this.entityStore.commit();
	}
	
	public void rollback() throws Exception {
		//this.entityStore.rollback();
	}
	
	
	
	public FederatedEntityStore getEntityStore() {
		return entityStore;
	}
	
	
	
	public WebServiceGroupManager getWebServiceGroupManager() {
		
		return new WebServiceGroupManager(this);
	}
	
	public ServiceManager getServiceManager() {
		
		return new ServiceManager(this);
	}
	
	public PolicyManager getPolicyManager() {
		
		return new PolicyManager(this);
	}
	
	public SchemaCacheManager getSchemaCacheManager() {
		
		return new SchemaCacheManager(this);
	}
	
	public XPathManager getXPathManager() {
		return new XPathManager(this);
	}
	
	public RegularExpressionManager getRegularExpressionManager() {
		return new RegularExpressionManager(this);
	}
	
	public TypeManager getTypeManager() {
		return new TypeManager(this);
	}
	
	public PolicyCategoryManager getPolicyCategoryManager() {
		return new PolicyCategoryManager(this);
	}
	
	public RemoteHostManager getRemoteHostManager() {
		return new RemoteHostManager(this);
	}
	
	public CertificateManager getCertificateManager() {
		return new CertificateManager(this);
	}
	
	public StylesheetManager getStylesheetManager() {
		return new StylesheetManager(this);
	}
}
